package com.chefu.common.exception;

import lombok.Getter;

/**
 * 黑马程序员
 */
@Getter
public enum ExceptionEnum {
    INVALID_FILE_TYPE(40001, "无效的文件类型！"),
    INVALID_PARAM_ERROR(40002, "无效的请求参数！"),
    INVALID_PHONE_NUMBER(40003, "无效的手机号码"),
    INVALID_VERIFY_CODE(40004, "验证码错误！"),
    INVALID_USERNAME_PASSWORD(40005, "无效的用户名和密码！"),

    INVALID_NOTIFY_PARAM(40006, "回调参数有误！"),
    INVALID_NOTIFY_SIGN(40007, "回调签名有误！"),

    CATEGORY_NOT_FOUND(4008, "商品分类不存在！"),
    BRAND_NOT_FOUND(4009, "品牌不存在！"),

    GOODS_NOT_FOUND(4010, "商品不存在！"),
    CARTS_NOT_FOUND(4011, "购物车不存在！"),
    APPLICATION_NOT_FOUND(4012, "应用不存在！"),
    ORDER_NOT_FOUND(4013, "订单不存在！"),
    ORDER_DETAIL_NOT_FOUND(4014, "订单数据不存在！"),
    FAIL_OLD_PASSWORD(4200, "旧密码错误！"),


    DATA_TRANSFER_ERROR(5000, "数据转换异常！"),
    INSERT_OPERATION_FAIL(5001, "新增操作失败！"),
    UPDATE_OPERATION_FAIL(5002, "更新操作失败！"),
    DELETE_OPERATION_FAIL(5003, "删除操作失败！"),

    FILE_WRITER_ERROR(5004, "文件写入失败！"),
    SEND_MESSAGE_ERROR(5005, "短信发送失败！"),
    INVALID_ORDER_STATUS(5006, "订单状态不正确！"),
    STOCK_NOT_ENOUGH_ERROR(5007, "库存不足！"),

    TIME_INTERVAL_INCORRECT(5008,"时间范围有误"),
    VALID_EXCEPTION(5009,"参数格式有误"),
    UNKNOW_EXCEPTION(5010,"服务器正忙，请稍后再试"),
    UNAUTHORIZED(4015, "登录失效或未登录！");



    private int status;
    private String message;

    ExceptionEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }
}